/*
 * @Author: g05047
 * @Date: 2023-08-02 15:03:22
 * @LastEditors: g05047
 * @LastEditTime: 2023-08-16 14:40:03
 * @Description: file content
 */
import request from '@/utils/request'

// let { VUE_APP_BASE_API } = process.env;
let VUE_APP_BASE_API = 'dailySupervision-api';

//获取主体检查统计
export function getMainBodyCheckStatistics(data) {
  return request({
    url: VUE_APP_BASE_API + "/rcjd-api/sincerity/business/unit/getData",
    method: "post",
    data
  });
}

//当前人员所有可查看机构列表
export function getUnitListByPerson(unitId) {
  return request({
    url: VUE_APP_BASE_API + "/rcjd-api/sincerity/business/unit/findAllUnit?unitId=" + unitId,
    method: "get",
  });
}

//获取检查项统计
export function getCheckItemStatistics(data) {
  return request({
    url: VUE_APP_BASE_API + "/rcjd-api/sincerity/business/unit/getIncompatibleByBodyIn",
    method: "post",
    data
  });
}

//获取检查项总数统计
export function getCheckItemTotalNum(data) {
  return request({
    url: VUE_APP_BASE_API + "/rcjd-api/sincerity/business/unit/getIncompatibleByBodyIn/total",
    method: "post",
    data
  });
}


//获取涉及单位统计
export function getUnitStatistics(data) {
  return request({
    url: VUE_APP_BASE_API + "/rcjd-api/sincerity/business/unit/getIncompatibleUnit",
    method: "post",
    data
  });
}

//导出涉及单位统计
export function exportExcel(param) {
  let url = VUE_APP_BASE_API + `/rcjd-api/sincerity/business/unit/export/list?bodyIndustry=${param.bodyIndustry}&checkContentId=${param.checkContentId}&checkStatus=${param.checkStatus}&startDate=${param.startDate}&endDate=${param.endDate}&unitId=${param.unitId}`
  return request({
    url: url,
    method: "get",
  });
}

//获取守查保统计
export function getShouChaBaoStatistics(data) {
  return request({
    url: VUE_APP_BASE_API + "/rcjd-api/sincerity/business/unit/getShouChaBaoData",
    method: "post",
    data
  });
}


//复查整改列表
export function getDailyCheckResult(data) {
  return request({
    url: VUE_APP_BASE_API + "/rcjd-api/dailyCheckResult/list/recheck",
    method: "post",
    data
  });
}

//复查整改详情
export function getDailyCheckResultDetail(id) {
  return request({
    url: VUE_APP_BASE_API + "/rcjd-api/dailyCheckResult/recheck/detail?id=" + id,
    method: "get",
  });
}

//复查整改审核
export function updateRecheckStatus(data) {
  return request({
    url: VUE_APP_BASE_API + "/rcjd-api/dailyCheckResult/recheck/update/status",
    method: "post",
    data
  });
}
